![]() | ![]() | ![]() | ![]() |
If you use a WHERE clause that contains an AND condition and the first two arguments in the AND condition are identical, an incorrect number of observations might be returned.
The following code example illustrates the issue. After the code executes, multiple observations occur, but the expectation is that one observation should be returned:
No notes, warnings, or errors are issued in the SAS® log to indicate that an incorrect number of observations has been returned.
There are two workarounds.
The first workaround is to change the WHERE clause to have the following syntax:
After you make that change, one observation is returned, as expected.
The second workaround is to substitute an IF statement in place of the WHERE clause. Here is an example:
Using an IF statement also returns the correct number of observations, which is one in this scenario.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | z/OS | 9.4 TS1M1 | 9.4 TS1M8 |
z/OS 64-bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft® Windows® for x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8 Pro x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows 10 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2008 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2008 R2 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2008 for x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M1 | 9.4 TS1M8 | ||
Microsoft Windows Server 2012 Std | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Enterprise 32 bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Enterprise x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Home Premium 32 bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Home Premium x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Professional 32 bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Professional x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Ultimate 32 bit | 9.4 TS1M1 | 9.4 TS1M8 | ||
Windows 7 Ultimate x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
64-bit Enabled AIX | 9.4 TS1M1 | 9.4 TS1M8 | ||
64-bit Enabled Solaris | 9.4 TS1M1 | 9.4 TS1M8 | ||
HP-UX IPF | 9.4 TS1M1 | 9.4 TS1M8 | ||
Linux for x64 | 9.4 TS1M1 | 9.4 TS1M8 | ||
Solaris for x64 | 9.4 TS1M1 | 9.4 TS1M8 |